package listener

import "cdam/enum"

type ListenParameter struct {
	ProcessCode string
	ProcessId   int64
	ProcessName string

	InstanceId   int64
	InstanceCode string

	CurrentNodeId       int64
	CurrentNodeCode     string
	CurrentNodeParmeter interface{}

	NextNodeId   int64
	NextNodeCode string

	CandidateParameter interface{}
	BtnClient          enum.BtnClientType
}

type Listener interface {

	// 开始创建实例之前
	BeforInstanceStart()

	// 开始创建实例之后
	AfterInstanceStart()

	BeforeNextStep(parameter ListenParameter) ListenParameter

	AfterNextStep(parameter ListenParameter) ListenParameter

	AfterEndInstance(parameter ListenParameter) ListenParameter

	BeforeEndInstance(parameter ListenParameter) ListenParameter
}

